import { detectBroswer } from '@/common/utils'

export default function({ req, redirect, store, route }) {
  if (req && req.headers) {
    const browser = detectBroswer(req.headers)
	  store.commit('updateBorswer', browser)
    if (browser) {
      // app.router.push('/')
      route.name !== '' && redirect('/')

    }
  }
}
